public class pra01 {
    public static void main(String[] args) {
    Overload obj = new Overload();
        System.out.println(obj.overload(1,2));
        System.out.println(obj.overload(1,2.2));
        System.out.println(obj.overload(1.1,2));
        System.out.println(obj.overload(1,2,3));
    }
}
class Overload {
    //两个整数的和
    public int overload(int a,int b){
        System.out.println("overload(int a,int b)被调用");
        return a+b;
    }
    //一个整数，一个 double 的和
    public double overload(int a,double b){
        System.out.println("overload(int a,double b)被调用");
        return a+b;
    }
    //一个 double ,一个 Int 和
    public double overload(double b,int a){
        System.out.println("overload(double b,int a)被调用");
        return a+b;
    }
    //三个 int 的和
    public double overload(int a,int b,int c){
        System.out.println("overload(int a,int b,int c)被调用");
        return a+b+c;
    }
}
